from bottle import route,run,view,template

@route('/:name')
def index(name='World'):
    return '&lt;&gt;Hello %s!&lt;&gt;'% name

@route('/view_test')
@route('/view_test/<name>')
@view('hello_template')
def hello1(name='World'):
    return dict(name=name)

@route('/template_test')
@route('/template_test/<name>')
def hello2(name='World'):
    return template('hello_template', name=name)

@route('/login')
@view('login')
def login(name='World'):
    return dict(name=name)

run(host='localhost', port=8080)
